<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" id="myBtn" value="Click Me">
<script>
    let btn = document.getElementById('myBtn')
    btn.onclick = function () {
        // this引用元素本身
        console.log('this',[this])
        console.log('Clicked')
    }
    
    // 如果要移除点击事件
    // btn.onclick = null;
</script>
</body>
</html>